import { reactive } from "vue";

let _state = null
function StateFactory() {
    const state = reactive({
        componentCN: "",
        componentEN: "",
        componentType: "page",
        codeType: "1",
        /**
         * {name:"",describtion:"",dataType:"",defaultValue:""}
         */
        defaultState: [],
        allService: [],
        allController: []
    });
    return state;
}

export default function StateCreater() {
    if (!_state) {
        _state = StateFactory();
    }
    return _state;
}